package cn.hls.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * @fileName: Member.java
 * @package: cn.christ.entity
 * @Description: 企业基本信息
 * @author: yinghui.zhang
 * @email: uuhui@163.com
 * @date: 2015-7-18
 */
@Entity
@Table(name = "T_company")
@DynamicInsert
@DynamicUpdate
public class Company extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name;// 企业全称
	private String bussinessRegisteNum;// 工商注册号
	private Date bussinessRegisteValidity;//工商注册号有效期
	private Integer type;// 企业业类型 1-承运企业 2-托运企业-
	private String bussinessLicenseNum;// 经营许可证号
	private Date bussinessLicenseValidity;//经营许可证有效期
	private String bussinessScope;// 经营范围
	private String legalMan;// 企业法人代表
	private String legalManPhone;// 企业法人代表联系电话
	private String contractor;// 联系人
	private String contractPhone;// 联系电话
	private Long provinceId;// 省份编号
	private String provinceName;// 省份名称
	private Long cityId;// 城市编号
	private String cityName;// 城市名称
	private Long areaId;// 区县编号
	private String areaName;// 区县名称
	private Long streetId;// 乡镇街道编号
	private String streetName;// 乡镇街道名称
	private String fax;// 传真
	private String email;// 企业邮箱
	private String address;// 地址
	private String remark;// 备注
	private Long shipperId;// 托运方编号
	private String searchAttribute;//查询属性
	private Long carryCompanyId;//承运企业编号
	public Company() {

	}

	public Company(Long id){
		super(id);
	}
	public Company(Long shipperId, String name) {
		this.shipperId = shipperId;
		this.name = name;
	}

	@Column(name = "type", columnDefinition = "char default 1")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "name", length = 64)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "bussiness_Registe_num", length = 32)
	public String getBussinessRegisteNum() {
		return bussinessRegisteNum;
	}

	public void setBussinessRegisteNum(String bussinessRegisteNum) {
		this.bussinessRegisteNum = bussinessRegisteNum;
	}

	@Column(name="bussiness_registe_validity")
	public Date getBussinessRegisteValidity() {
		return bussinessRegisteValidity;
	}

	public void setBussinessRegisteValidity(Date bussinessRegisteValidity) {
		this.bussinessRegisteValidity = bussinessRegisteValidity;
	}

	@Column(name = "province_id")
	public Long getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(Long provinceId) {
		this.provinceId = provinceId;
	}

	@Column(name = "province_name", length = 16)
	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	@Column(name = "city_id")
	public Long getCityId() {
		return cityId;
	}

	public void setCityId(Long cityId) {
		this.cityId = cityId;
	}

	@Column(name = "city_name", length = 16)
	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	@Column(name = "area_id")
	public Long getAreaId() {
		return areaId;
	}

	public void setAreaId(Long areaId) {
		this.areaId = areaId;
	}

	@Column(name = "area_name", length = 16)
	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	@Column(name = "street_id")
	public Long getStreetId() {
		return streetId;
	}

	public void setStreetId(Long streetId) {
		this.streetId = streetId;
	}

	@Column(name = "street_name", length = 16)
	public String getStreetName() {
		return streetName;
	}

	public void setStreetName(String streetName) {
		this.streetName = streetName;
	}

	@Column(name = "contractor", length = 16)
	public String getContractor() {
		return contractor;
	}

	public void setContractor(String contractor) {
		this.contractor = contractor;
	}

	@Column(name = "contract_phone", length = 16)
	public String getContractPhone() {
		return contractPhone;
	}

	public void setContractPhone(String contractPhone) {
		this.contractPhone = contractPhone;
	}

	@Column(name = "fax", length = 16)
	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@JsonIgnore
	@Column(name = "address", length = 100)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@JsonIgnore
	@Column(name = "remark", length = 100)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "email", length = 50)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "bussiness_license_num", length = 32)
	public String getBussinessLicenseNum() {
		return bussinessLicenseNum;
	}

	public void setBussinessLicenseNum(String bussinessLicenseNum) {
		this.bussinessLicenseNum = bussinessLicenseNum;
	}

	@Column(name = "bussiness_scope", length = 64)
	public String getBussinessScope() {
		return bussinessScope;
	}

	public void setBussinessScope(String bussinessScope) {
		this.bussinessScope = bussinessScope;
	}
	
	@Column(name="bussiness_license_validity")
	public Date getBussinessLicenseValidity() {
		return bussinessLicenseValidity;
	}

	public void setBussinessLicenseValidity(Date bussinessLicenseValidity) {
		this.bussinessLicenseValidity = bussinessLicenseValidity;
	}

	@Column(name = "legal_man", length = 16)
	public String getLegalMan() {
		return legalMan;
	}

	public void setLegalMan(String legalMan) {
		this.legalMan = legalMan;
	}

	@Column(name = "legal_man_phone", length = 16)
	public String getLegalManPhone() {
		return legalManPhone;
	}

	public void setLegalManPhone(String legalManPhone) {
		this.legalManPhone = legalManPhone;
	}

	@Transient
	public Long getShipperId() {
		return shipperId;
	}

	public void setShipperId(Long shipperId) {
		this.shipperId = shipperId;
	}

	@Transient
	public String getSearchAttribute() {
		return searchAttribute;
	}

	public void setSearchAttribute(String searchAttribute) {
		this.searchAttribute = searchAttribute;
	}

	@Column(name="carry_company_id")
	public Long getCarryCompanyId() {
		return carryCompanyId;
	}

	public void setCarryCompanyId(Long carryCompanyId) {
		this.carryCompanyId = carryCompanyId;
	}
}
